const client = require("./redis");
function setString(key, value, expire) {
    return new Promise((resolve, reject) => {
        client.set(key, value, (error, replay) => {
            if (error) {
                reject("设置失败")
            }
            if (expire) {
                client.expire(key, expire);
            }
            resolve("设置成功")
        });
    })
}


module.exports = {
    setString
}